home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1994 #2 / Monster Media No. 2 (Monster Media)(1994).ISO / clipper / tcmclp.zip / SCRNPLAY.DOC < prev    next >
Text File  |  1989-02-14  |  4KB  |  97 lines

  1. The following routines are for use with Clipper, Summer '87. They are
  2. contributed to the public domain. No warranty or fitness for a particular
  3. use is claimed.
  4.  
  5.                         Rick Whitt, SysOp
  6.                         dBoard BBS - Winston-Salem, NC
  7.                         (919) 768-3043
  8.  
  9.                         June 20, 1988
  10.  
  11.  
  12. Most of the following routines are pretty specialized, but if you need
  13. one of them, they can come in real handy !
  14.  
  15.  
  16. CHGATTR()  - Sets the color ( attribute ) of a specified area of the screen
  17.              without disturbing the characters. Useful if you want to change
  18.              the color of the screen without re-drawing it. Uses direct
  19.              video access for speed.
  20.  
  21.                 CHGATTR( t_row, l_col, b_row, r_col, f_attr, b_attr )
  22.  
  23.              Where the first four parameters are the screen coordinates,
  24.              and the last 2 are the foreground and background attributes,
  25.              as follows:
  26.  
  27.  
  28.                 Black          0       Gray               8
  29.                 Blue           1       Light blue         9
  30.                 Green          2       Light green       10
  31.                 Cyan           3       Light cyan        11
  32.                 Red            4       Light red         12
  33.                 Magenta        5       Light magenta     13
  34.                 Brown          6       Yellow            14
  35.                 White          7       Bright white      15
  36.  
  37.              Note that only the first 8 are used for background colors.
  38.  
  39.  
  40. CLRAREA()  - Clears all of the characters from the given screen area
  41.              without disturbing the colors.
  42.  
  43.                  CLRAREA( t_row, l_col, b_row, r_col )
  44.  
  45.  
  46. FILLAREA() - Fills the specified screen area with the given character,
  47.              maintaining the existing colors.
  48.  
  49.                  FILLAREA( t_row, l_col, b_row, r_col, ascii_char )
  50.  
  51.              Where ascii_char is the character to be used. Note that
  52.              this is the ASCII NUMBER of the character ( like 'A' = 65 ).
  53.  
  54. OVRWRITE() - Writes the specified character at the current cursor
  55.              position.
  56.  
  57.                  OVRWRITE( ascii_char )
  58.  
  59.              Again, ascii_char is the number of the character.
  60.  
  61.  
  62. SWAPATTR() - Inverses the attributes in the given area.
  63.  
  64.                  SWAPATTR( t_row, l_col, b_row, r_col )
  65.  
  66. CHGALL()   - Changes all attributes on the screen of a given color
  67.              to a 2nd set of attributes. Does not disturb anything
  68.              that does not match the first set of attributes.
  69.  
  70.                  CHGALL( f_attr1, b_attr1, f_attr2, b_attr2 )
  71.  
  72.              Where all parameters are attribute numbers as given for
  73.              CHGATTR(), with the first set the "FROM" attributes and
  74.              the 2nd set the "TO" attributes.
  75.  
  76.  
  77. READATTR() - Returns the attribute at the given cursor position.
  78.  
  79.                  attr = READATTR( row, col )
  80.  
  81.              Note that the returned value is the combined attribute
  82.              byte representing both foreground & background. To resolve
  83.              this into separate fore & back attributes, make two calls:
  84.  
  85.                  f_attr = MOD( READATTR( row, col ), 16 )
  86.                  b_attr = INT( READATTR( row, col ) / 16 )
  87.  
  88.  
  89. READCHAR() - Returns the character displayed at the given coordinates.
  90.  
  91.                  ascii_char = READCHAR( row, col )
  92.  
  93.              Where ascii_char is the ASCII NUMBER of the character.
  94.  
  95.  
  96.  
  97.